The present invention relates generally to data storage systems and more particularly relates to tape drive emulation (TDE) systems.
Many data processing systems utilize tape drives for storage of data. Channel interfaces and commands generated by a data source to control the transfer of data from a host computer to a tape drive are well-known in the art and will not be described in detail here. One example of an operating system for managing data transfer between a host computer and a tape drive is the MVS system manufactured by the IBM Corporation.
Write and read operations of a tape drive are, of course, all sequential from the viewpoint of the using host or hosts. Thus, even though I/O may be done over multiple ESCON links (or over such other channel path types as BMC or SCSI), all leading to the same drive, commands for the drive are issued and active on only one link or path at a time. Ending status for each command must reach the channel which issued the command before it or another channel will issue a subsequent command.
Within a tape subsystem, a drive commonly connects to two tape controllers and each controller connects to more than one host channel or ESCON link. Within each tape controller, a data buffer set and a data formatter, including compression circuits, are shared by processes routing data to and from multiple drives and routing data to and from multiple host connections. Further, the two controllers connecting to a drive often have connections also to each other's data buffer and formatter.
Channel connections (ESCON or other) may link a controller to more than one host to permit sharing of tape drives, though not to allow multiple computers to do I/O to a given tape during a single period when the tape is mounted on a drive. A reliable scheme of reservations is needed to serialize the use of such shared drives among the hosts.
In the course of writing a single tape, more than one of the many paths available through the subsystem might be used. Multiple data blocks on their way to a tape may arrive on different paths and be buffered in controllers at one time. Even though the blocks leave the host in a wanted sequence, ensuring that they reach the tape in the same sequence requires a reliable system of data serialization rules and mechanisms.
Drive Serialization
In many tape subsystems, drive serialization is accomplished by a convention under which hosts first declare "path groups" to identify sets of host-to-controller-to-drive paths which are eligible to be used concurrently by a single host for I/O to a single drive. Data to/from a drive may move across paths in such a group in any pattern of alternating choice of path. "Alternation" means the paths may be used "concurrently" but not "simultaneously," since I/O is always sequential--one command at a time.
For a host to actually use a drive, the drive must be "assigned" to the path group created for that host's use of the drive. Assignment has the quality of a mutual exclusion lock or "mutex" in that a drive can only be assigned to paths of one group at a time. Thus, path grouping and assignment achieves drive serialization. Assignment and path grouping are accomplished by a host through a set of special channel commands defined for the purpose. MVS and some other host operating systems follow this drive serialization convention.
In a tape drive emulation system, the data output by the host is not actually written to a tape drive and data input by the host is not actually read from a tape drive. In one type of TDE system the data is stored on staging disks.
Data Serialization
The basic unit of data processed by channel commands is a "block." Prior to storage, blocks are usually compressed and "packetized," with each packet including compressed data, a header, and a trailer. As is well-known, the header and trailer include control information, information about the data block, and error checking information.
In a TDE system several packets may be in processing at a given time. Thus, a reliable system for maintaining the sequential ordering inherent in tape-formatted data must be developed for a TDE system.